import java.io.File;


import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;


import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;


public class XmlParser {

	public XmlParser() {
		
	}
	
	public static void main(String[] args) {
		try {
			File file = new File("Test.xml");
			System.out.println(file.getAbsolutePath());
			DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
			DocumentBuilder db = dbf.newDocumentBuilder();
			Document doc = db.parse(file);
			doc.getDocumentElement().normalize();
			System.out.println("Root Element " + doc.getDocumentElement().getNodeName());
			NodeList nodeLst = doc.getElementsByTagName("employee");
			
			
		} catch (Exception ex) {
			System.out.println("Cannot find file!");
		}
	}
}
